package com.dusk.service.impl;

import com.dusk.dao.MessageMapper;
import com.dusk.pojo.Message;
import com.dusk.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MessageServiceImpl implements MessageService {

    @Resource
    private MessageMapper messageMapper;

    @Override
    public Message queryMessageById(int id) {
        return messageMapper.queryMessageById(id);
    }

    @Override
    public List<Message> queryMessageByUuid(String uuid) {
        return messageMapper.queryMessageByUuid(uuid);
    }

    @Override
    public void addMessage(Message message) {
        messageMapper.addMessage(message);
    }

    @Override
    public int queryAllMessage() {
        return messageMapper.queryAllMessage();
    }
}
